<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #name{
            width: 400px;
            height: 80px;
        }
    </style>
</head>

<body>
    <input id="name" type="text" />
    <p id="showName"></p>
    <button id="btn">click me</button>

   

    <script>
        let btn = document.getElementById('btn');
        let inputName = document.getElementById('name');
        let showName = document.getElementById('showName');

        btn.onclick = function () {
            // showName.innerHTML = inputName.value;
            showName.innerText = inputName.value;
        }
    </script>
</body>

</html>